package com.java502.shirodemo502.service.impl;

import com.java502.shirodemo502.dao.UserMapper;
import com.java502.shirodemo502.pojo.User;
import com.java502.shirodemo502.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author:Teacher黄
 * @date:Created at 2019/07/29
 */
@Service
@Transactional(rollbackFor = Exception.class)
@SuppressWarnings("all")
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUser(String userName) {
        return userMapper.findByUserName(userName);
    }
}
